﻿using DDD.Simple.DomainBase;
using System;
using System.Collections.Generic;
using System.Text;

namespace Product.Domain.Core
{
    public class ProductSKU
        : IEntity
    {
        public ProductSKU()
        {}
        public ProductSKU(Guid id,
            Guid productId,
            string spec,
            UnitEnum unit,
            decimal pv,
            decimal price,
            byte[] image,
            string productSPUName)
        {
            Id = id;
            Code = $"Code{productId}{id}";
            Spec = spec;
            Unit = unit;
            PV = pv;
            DealerPrice = price;
            Image = image;
            ProductSPUId = productId;
            ProductSPUName = productSPUName;
        }
        public string Code { get; set; }
        public Guid Id { get; set; }
        public string Spec { get; set; }
        public UnitEnum Unit { get; set; }
        public decimal PV { get; set; }
        public decimal DealerPrice { get; set; }
        public byte[] Image { get; set; }
        public Guid ProductSPUId { get; set; }
        public string ProductSPUName { get; set; }
        public virtual ProductSPU ProductSPU { get; set; }
    }
}
